﻿Public MustInherit Class Base
    Public id As Long = 0

    Public Overrides Function Equals(ByVal obj As Object) As Boolean
        If obj Is Nothing Then
            Return False
        End If
        If ReferenceEquals(Me, obj) Then
            Return True
        End If
        If Not TypeOf obj Is Base Then
            Return False
        End If
        Dim other As Base = DirectCast(obj, Base)
        Return Me.id = other.id
    End Function

    Public MustOverride Sub validate()

    Protected Function isEmptyString(ByVal str As String) As Boolean
        If str Is Nothing Then
            Return True
        End If
        Return Trim(str) = ""
    End Function


End Class
